<script setup>
import { useMyStore } from '../../stores';
import { showToast } from '../../utils';
  const outLogin = () => {
    const store = useMyStore()
    uni.showModal({
      title:'提示',
      content:'是否确认退出登录',
      success: (isOut) => {
        if(isOut){
          store.setToken('')
          uni.navigateTo({
            url:'/pages/login/index'
          })
        }
      }
    })
  }

  const showMsg = () => {
    showToast('清楚缓存成功！！')
  }
</script>

<template>
  <view class="page-container">
    <view class="settings-list">
      <uni-list :border="false">
        <!-- <uni-list-item title="换绑手机" to="/subpkg_user/mobile/index" show-arrow /> -->
        <uni-list-item title="修改密码" to="/subpkg_user/password/index" show-arrow />
        <uni-list-item title="消息通知设置" to="/subpkg_user/notify/index" show-arrow />
        <uni-list-item @click="showMsg" title="清理缓存" show-arrow />
      </uni-list>
    </view>
    <button class="logout-button" @click="outLogin()">退出</button>
  </view>
</template>

<style lang="scss" scoped>
  @import './index.scss';
</style>
